package bbs.entity.enums;

public enum UserIntegralOperTypeEnum {
    REGISTER(1, "注册"),
    USER_DOWNLOAD_ATTACHMENT(2, "下载附件"),
    DOWNLOAD_ATTACHMENT(3, "下载附件"),
    POST_COMMENT(4, "评论"),
    POST_ARTICLE(5, "发帖"),
    ADMIN(6, "管理员操作"),
    DEL_ARTICLE(7, "删除帖子"),
    DEL_COMMENT(8, "删除评论");


    private Integer operType;
    private String desc;

    private UserIntegralOperTypeEnum(Integer operType, String desc) {
        this.operType = operType;
        this.desc = desc;
    }
    public static UserIntegralOperTypeEnum getByOperType(Integer operType) {
        for (UserIntegralOperTypeEnum item : UserIntegralOperTypeEnum.values()) {
            if (item.getOperType().equals(operType)) {
                return item;
            }
        }
        return null;
    }
    public Integer getOperType() {
        return operType;
    }
    public String getDesc() {
        return desc;
    }

}
